<template>
  <PageWrapper>
    <template #headerContent> <WorkbenchHeader /> </template>
    <div class="lg:flex">
      <div class="lg:w-7/10 w-full !mr-4 enter-y">
        <DataList class="enter-y" :list="dataList"/>
        <h1></h1>
        <GoodsOfStockWarning class="enter-y"/>
        <h1></h1>
        <GoodsOfStockExpire class="enter-y"/>
        <!-- <ProjectCard :loading="loading" class="enter-y" />
        <DynamicInfo :loading="loading" class="!my-4 enter-y" /> -->
      </div>
      <div class="lg:w-3/10 w-full enter-y">
        <QuickNav v-if="navList.length > 0" class="enter-y" :list="navList" />
        <Card class="!my-4 enter-y">
          <img class="xl:h-50 h-30 mx-auto mmm" src="../../../assets/svg/illustration.svg"/>
        </Card>
        <!-- <SaleRadar :loading="loading" class="enter-y" /> -->
      </div>
    </div>
  </PageWrapper>
</template>
<script lang="ts" name="Workbench" setup>
import { Card } from 'ant-design-vue';
import { ref } from 'vue';
import DataList from './components/DataList.vue';
// import DynamicInfo from './components/DynamicInfo.vue';
import GoodsOfStockExpire from './components/GoodsOfStockExpire.vue';
import GoodsOfStockWarning from './components/GoodsOfStockWarning.vue';
// import ProjectCard from './components/ProjectCard.vue';
import QuickNav from './components/QuickNav.vue';
// import SaleRadar from './components/SaleRadar.vue';
import WorkbenchHeader from './components/WorkbenchHeader.vue';
import { GroupItem } from "./components/data";
import { RouteItem } from "/@/api/admin/menu";
import { getHomedata } from "/@/api/wms/home-data";
import { PageWrapper } from '/@/components/Page';

const dataList = ref<GroupItem[]>([])
const navList = ref<RouteItem[]>([])
getHomedata().then(dd => {
  dataList.value.push({title: '仓库', icon: 'material-symbols:account-balance-outline-rounded', color: '#3fb27f', count: dd.warehouseCount,})
  dataList.value.push({title: '客户', icon: 'icon-park-outline:customer', color: '#3fb27f', count: dd.customerCount,})
  dataList.value.push({title: '供应商', icon: 'material-symbols:partner-exchange', color: '#3fb27f', count: dd.supplierCount,})
  // dataList.value.push({title: '承运商', icon: 'icon-park-twotone:transporter', color: '#3fb27f', count: dd.carrierCount,})
  dataList.value.push({title: '货物种类', icon: 'material-symbols-light:hotel-class', color: '#3fb27f', count: dd.goodsCount,})
  navList.value = dd.navList
})

</script>
<style scoped>
</style>
